package day03;

public class Day03Text {
    public static void main(String[] args) {
        //1.
        /*System.out.println(9%3);//0
        System.out.println(5%2);//1
        System.out.println(0%5);//0

         */

        //int a =1,b=2;
        /*a++;
        System.out.println(a);
        b--;
        System.out.println(b);

         */

        /*int c=a++;//1
        int d=++a;//3
        System.out.println(c);
        System.out.println(d);
        */

        //2.
        /*int a=5,b=6,c=7;
        System.out.println(a>b);//false
        System.out.println(b>a);//true
        System.out.println(b<c);//true
        System.out.println(a<=b);//true
        System.out.println(b>=a);//true
        System.out.println(a==c);//false
        System.out.println(a!=c);//true

        System.out.println(a<b+c);//true

         */

        //3.
        /*int a=5,b=10,c=5;
        System.out.println(a>b && a==c);//false
        System.out.println(a<b && a>c);//false
        System.out.println(b>a && c<b);//true
        System.out.println(a>b || a==c);//true
        System.out.println(b>a || a>c);//true
        System.out.println(a==b || b<c);//false
        boolean b1 = !(a>b);//true
        boolean b2 = !(b>c);//false
        System.out.println(b1);
        System.out.println(b2);

        System.out.println(a>b && a++!=c);
        System.out.println(a);
        System.out.println(a<b || a++==c);
        System.out.println(a);

         */

        //4.
        /*int a = 5,b=4,c=3,d=2;
        a += 10;
        System.out.println(a);//15
        b *= 2;
        System.out.println(b);//4
        c /= 3;
        System.out.println(c);//1
        d %= 1;
        System.out.println(d);//0

        short x = 10;
        x = (short) (x+10);
        System.out.println(x);//20

         */

        //5.
        /*int age =22;
        System.out.println("age="+age);
        System.out.println("我的年龄是"+age);
        String name = "郭金磊";
        System.out.println("name"+name);
        System.out.println("我的名字是"+name);
        System.out.println("我的名字是"+name+",我的年龄是"+age);
         */

        //6.
        /*int a = 2;
        int flag = a>0?1:0;
        System.out.println(flag);

        int b=8,c=10;
        int max = b>c?b:c;
        System.out.println(max);
         */

        //7.
        /*double price=600;
        if (price>=500){
            price *= 0.8;
        }
        System.out.println("最终的金额是"+price);

        double score=95.5;
        if (score>=0 && score <=100){
            System.out.println(score+"成绩是合法的");
         */

        //8.
        /*double price = 600;
        if (price >= 500){
            price *= 0.8;

        }else {
            price *= 0.9;
        }
        System.out.println("最终的金额是"+price);

        double score = 95.5;
        if (score>=0 && score <=100){
            System.out.println(score+"成绩是合法的");
        }else {
            System.out.println(score+"成绩是不合法的");
        }

         */

        //9.
        double price=6000;
        if (price>=2000){
            price *= 0.5;
        }else if (price>=1000){
            price *= 0.7;
        }else if (price>=500){
            price *= 0.8;
        }else {
            price *= 0.9;
        }
        System.out.println("最终的金额是"+price);

    }
}
